//
//  GoOutDestinationTableView.m
//  ArtOfLiving
//
//  Created by 刘虎 on 16/5/5.
//  Copyright © 2016年 刘虎. All rights reserved.
//

#import "GoOutDestinationTableView.h"
#import "GoOutDestinationHeadView.h"

@interface GoOutDestinationTableView ()<UITableViewDelegate, UITableViewDataSource>

@end

@implementation GoOutDestinationTableView

- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style {
    
    self = [super initWithFrame:frame style:style];
    if (self) {
        
        self.delegate = self;
        self.dataSource = self;
        [self createHeadView];
    }
    return self;
}


#pragma mark - ----创建头饰图-----

- (void)createHeadView {
    
    UINib *nib = [UINib nibWithNibName:@"GoOutDestinationHeadView" bundle:nil];
    GoOutDestinationHeadView *headView = [[nib instantiateWithOwner:nil options:nil] firstObject];
    headView.frame = CGRectMake(0, 0, kScreenWidth, kScreenWidth*348.0/640.0);
    self.tableHeaderView = headView;
}


#pragma mark - ----tableView的代理方法----
- (NSInteger)numberOfRowsInSection:(NSInteger)section {
    
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    
    return self.dataSourceMArr.count;
}



@end
